from dataclasses import dataclass

from dc_shop.core.models.enums.product import MeasurementUnit
from dc_shop.database.models import Feeling, Genetics


@dataclass
class ProductDTO:
    id: int
    title: str | None = None
    image_path: str | None = None
    description: str | None = None
    measurement: MeasurementUnit = MeasurementUnit.grams
    category_id: int | None = None
    price: float | None = None
    weight: int | None = None
    strain_name: str | None = None
    strain_type: str | None = None
    thc: int | None = None
    origin: str | None = None
    pgr: bool | None = None
    vhq: bool | None = None
    cbd: str | None = None
    available_quantity: int | None = None


@dataclass
class ProductWithParamsDTO(ProductDTO):
    feelings: list[Feeling] | None = None
    genetics: list[Genetics] | None = None
